package com.ilearnjava.dubbo;

import com.ilearnjava.spi.DataBaseDriver;

import java.util.ServiceLoader;

/**
 * @Project: seb-core
 * @Description:
 * @Version 1.0
 * @Throws SystemException:
 * @Author: <li>2019/1/3 lyndon Create 1.0
 * @Copyright (c)2018-2018 中央结算公司，版权所有
 * @Modified By:
 */
public class DataBaseConnection {
    public static void main(String[] args) {
        ServiceLoader<DataBaseDriver> serviceLoader =
                ServiceLoader.load(DataBaseDriver.class);

        for (DataBaseDriver driver : serviceLoader) {
            System.out.println(driver.connect("localhost"));
        }
    }
}
